<html lang="en">
<head>
    @include('Admin.header')
</head>
<body>
<!-- 顶部开始 -->
@component('Admin.section.title')
@endcomponent
<div class="wrapper">
    @include('Admin.menu')
    <div class="page-content">
        <div class="content">
            <xblock>
                <button class="layui-btn" onclick="_add('添加分类','{{url('Admin/System/classify/add')}}','600','400')"><i class="layui-icon">&#xe608;</i>添加</button><span class="x-right" style="line-height:40px">共有数据：{{count($list)}} 条</span>
            </xblock>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>
                        ID
                    </th>
                    <th>
                        分类名称
                    </th>
                    <th>
                        上级模块
                    </th>
                    <th>
                        路由
                    </th>
                    <th>
                        方法
                    </th>
                    <th>
                        排序
                    </th>
                    <th>
                        状态
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                </thead>
                <tbody>
                @foreach ($list as $vo)
                    <tr>
                        <td>
                            {{ $vo->id }}
                        </td>
                        <td>
                            {{ $vo->name }}
                        </td>
                        <td>
                            {{ $vo->m_name }}
                        </td>
                        <td >
                            {{$vo->route}}
                        </td>
                        <td >
                            {{$vo->func}}
                        </td>
                        <td >
                            {{$vo->sort}}
                        </td>
                        <td class="td-status">
                            @if(1 == $vo->status)
                            <span class="layui-btn layui-btn-normal layui-btn-mini">
                                已启用
                            </span>
                            @else
                            <span class="layui-btn layui-btn-disabled layui-btn-mini">已停用</span>
                            @endif
                        </td>
                        <td class="td-manage">
                            @if(1 == $vo->status)
                            <a style="text-decoration:none" onclick="_status_stop(this,'{{url('Admin/System/classify/status')}}','{{$vo->id}}','{{csrf_token()}}')" href="javascript:;" title="停用">
                                <i class="layui-icon">&#x1006;</i>
                            </a>
                            @else
                            <a style="text-decoration:none" onClick="_status_start(this,'{{url('Admin/System/classify/status')}}','{{$vo->id}}','{{csrf_token()}}')" href="javascript:;" title="启用"><i class="layui-icon">&#xe605;</i></a>
                            @endif
                            &nbsp;
                            <a title="编辑" href="javascript:;" onclick="_edit('编辑','{{url('Admin/System/classify/edit')}}/{{$vo->id}}','600','400')"
                               class="ml-5" style="text-decoration:none">
                                <i class="layui-icon">&#xe642;</i>
                            </a>&nbsp;
                            <a title="删除" href="javascript:;" onclick="_del(this,'{{url('Admin/System/classify/del')}}','{{$vo->id}}','{{csrf_token()}}')"
                               style="text-decoration:none">
                                <i class="layui-icon">&#xe640;</i>
                            </a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>
    </div>
</div>
@component('Admin.section.bg')
@endcomponent
</body
</html>